package design.factory;

/**
 * \* User: Administrator
 * <p>
 * \* Date: 2020/9/21
 * <p>
 * \* Time: 11:26
 * <p>
 * \* Description:
 * \
 */
public class Nvwa {
    public static void main(String[] args) {
        AbstractHumanFactory humanFactory = new HumanFactory();
        BlackHuman blackHuman = humanFactory.createHuman(BlackHuman.class);
        blackHuman.getColor();
        blackHuman.talk();
        WhiteHuman whiteHuman = humanFactory.createHuman(WhiteHuman.class);
        whiteHuman.getColor();
        whiteHuman.talk();
        YellowHuman yellowHuman = humanFactory.createHuman(YellowHuman.class);
        yellowHuman.getColor();
        yellowHuman.talk();
    }
}
